package com.ziyun.pop.modules.erpCustomerServieceUser.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ziyun.pop.common.utils.UserUtils;
import org.springframework.stereotype.Service;
import java.util.Map;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.pop.modules.erpCustomerServieceUser.dao.ErpCustomerServieceUserDao;
import com.ziyun.pop.modules.erpCustomerServieceUser.entity.ErpCustomerServieceUserEntity;
import com.ziyun.pop.modules.erpCustomerServieceUser.service.ErpCustomerServieceUserService;


@Service("erpCustomerServieceUserService")
public class ErpCustomerServieceUserServiceImpl extends ServiceImpl<ErpCustomerServieceUserDao, ErpCustomerServieceUserEntity> implements ErpCustomerServieceUserService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Long sellerId=UserUtils.getCurentUser().getSellerId();
        Page<ErpCustomerServieceUserEntity> page = (Page<ErpCustomerServieceUserEntity>) this.page(
                new Query<ErpCustomerServieceUserEntity>(params).getPage(),
                new QueryWrapper<ErpCustomerServieceUserEntity>().eq("seller_id",sellerId).eq("type",3)
        );

        return new PageUtils(page);
    }

}
